package demo;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.nio.charset.StandardCharsets;

public class HelloWord {
    public static void main(String[] args) throws Exception {
        FileOutputStream fos = new FileOutputStream("fos.dat");
        String s = "hello world";
        fos.write(s.getBytes(StandardCharsets.UTF_8));
        s="大家好";
        fos.write(s.getBytes(StandardCharsets.UTF_8));
        s="主线添加了";
        fos.write(s.getBytes(StandardCharsets.UTF_8));
        s = "有写入了操作";
        fos.write(s.getBytes(StandardCharsets.UTF_8));
        fos.write(1);
        System.out.println("sjhflkjf");
        fos.close();
    }
}
